﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Kaiser.Cubic.Models;
using Kaiser.Cubic.Models.Product;
using Kaiser.Cubic.Service;

namespace Kaiser.Cubic.Areas.China.Controllers
{
    public class ProductController : Controller
    {
        //
        // GET: /China/Product/
        CubicServiceClient _service = new CubicServiceClient();
        public ActionResult ProductDetail(string id)
        {
            return View();
        }
        public ActionResult ProductList(string code)
        {
           
            return View( );
        }

        public ActionResult Search(string keyword)
        {
            var keyWord = System.Web.HttpContext.Current.Server.UrlDecode(keyword);
            return View("ProductList");
        }

        public ActionResult ProductCategoriesDetials(string id)
        {
            var model = new ProductList();
            model.Products = new List<Models.ProductDetail>();
            for (int i = 0; i < 20; i++)
            {
                model.Products.Add(new Models.ProductDetail() { ProductName = "产品" + (i + 1).ToString(), ProductId = (i + 1).ToString(), ProductPic = "/images/Swimming_03.png", DehumidifierDescription = "产品描述" + (i + 1).ToString() });
            }
            return PartialView("_ProductCategoriesDetials", model);
        }
    }
}
